<html>
<head>
    <include file="Common/top"/>
    <include file="Common/import_plugins"/>

    <!--plugin_date-->
    <link rel="stylesheet" href="/Public/Home/css/plugin_date.css">
    <link rel="stylesheet" href="/Public/Home/css/ticket.css">

    <script src="/Public/Home/js/plugin_date.js"></script>
    <script src="/Public/Home/js/tickets.js"></script>

    <link rel="stylesheet" href="/Public/Home/css/order.css">
    <style>
        #playtime{
            display: none;
            height: 50px;
            line-height: 50px;
        }
    </style>
</head>
<body>
<div id="mask"></div>
<div class="box_info">
    <div class="title bg">
        游玩日期
        <span class="fr show_date_lay" data-aid="{$aid}" data-pid="{$pid}"><i class="layui-icon">&#xe65f;</i></span>
    </div>
    <div class="tickte_list">
        <div class="layui-row layui-col-space5">
            <div class="layui-col-xs9" id="playtime"></div>
            <div id="playdate">
            <volist name="current_price_list" id="vo">
                <div class="layui-col-xs3 ticket" data-date="{$vo['today']}">
                    <if condition="$vo['today'] eq date('Y-m-d' ,time())">
                        <div class="check_box checked">
                            <else/>
                            <div class="check_box">
                    </if>
                    <div class="date">{$vo['today']}</div>
                    <div class="price">￥{$vo['retail_price']}起</div>
                </div>
            </div>
            </volist>
        </div>
        <div class="layui-col-xs3">
            <div class="more_date show_date_lay" data-aid="{$aid}" data-pid="{$pid}">
                更多<br/>日期
            </div>
        </div>
    </div>
</div>
</div>

<div class="tips">
    <span class="tip">
        {$run_time.order_start}~{$run_time.order_end}内有效
    </span>
    <span class="tip">
        <switch name="run_time['refund_rule']">
            <case value="0">
                游玩日期内可退
            </case>
            <case value="1">
                验证截止前退
            </case>
            <case value="2">
                不可退
            </case>
            <default/>
                不可退
        </switch>
    </span>
</div>

<form action="{:U('do_pay')}" method="post">
    <input type="hidden" name="playtime" value="{$current_price_list[0]['today']}">
    <!--供应商id-->
    <input type="hidden" name="a_id" value="{$aid}">
    <!--景区id-->
    <input type="hidden" name="s_id" value="{$info.uuid}">
    <!--景区名称-->
    <input type="hidden" name="s_name" value="{$info.title}">
    <div class="box_info">
        <div class="title bg">
            选择购票
        </div>
        <div class="tickets">
            <ul>
                <volist name="ticket_list" id="vo">
                    <li>
                        <div class="layui-row">
                            <div class="layui-col-xs8">
                                <div class="ltitle">
                                    {$vo.title}
                                </div>
                                <div class="info">
                                    <span class="price">单价:￥</span>
                                    <span class="price_text">{$vo.retail_price}</span>
                                    <span class="num">库存:</span>
                                    <span class="num_text">{$vo.remain}</span>
                                </div>
                            </div>
                            <div class="layui-col-xs4">
                                <div class="num_box">
                                    <div class="reduce">-</div>
                                    <div class="input">
                                        <input name="orders[{$vo.pid}|{$vo.uuid}]" type="number" min="0" max="{$vo.remain}"
                                               value="0">
                                    </div>
                                    <div class="increase">+</div>
                                </div>
                            </div>
                        </div>
                    </li>
                </volist>
            </ul>
        </div>
    </div>

    <div class="box_info">
        <div class="title bg">
            购票信息
        </div>
        <table class="layui-table input_list">
            <tr>
                <td>联系人</td>
                <td><input type="text" class="input" name="real_name" placeholder="联系人姓名"></td>
            </tr>
            <tr>
                <td>手机号</td>
                <td><input type="text" class="input" name="mobile" placeholder="联系人手机号"></td>
            </tr>
            <!--
            <tr>
                <td>备注</td>
                <td><input type="text" class="input" placeholder="订单备注"></td>
            </tr>
            -->
            <tr>
                <td>身份证</td>
                <td><input type="text" class="input" name="certificate_no" placeholder="真实身份证号"></td>
            </tr>
        </table>
    </div>

    <div class="box_info">
        <div class="title">支付方式</div>
        <div class="layui-row layui-col-space5 pay_logos">
            <div class="layui-col-xs4"><img src="/Public/Home/image/wx_pay_logo.png"></div>
            <div class="layui-col-xs4"><img src="/Public/Home/image/ali_pay_logo.png"></div>
            <div class="layui-col-xs4"><img src="/Public/Home/image/yue_pay_logo.png"></div>
        </div>
    </div>

    <div style="height: 65px;"></div>

    <div class="foot pay_lay">
        <div class="layui-row">
            <div class="layui-col-xs8">
                总额：￥
                <span class="text" id="total_price">0</span>
            </div>
            <div class="layui-col-xs4">
                <input type="submit" class="submit" id="submit">
            </div>
        </div>
    </div>
</form>
<div class="datelay">
    <div class="year">
        <div class="left" onclick="change_month($(this),-1)" data-aid="{$aid}" data-pid="{$pid}">
            <
        </div>
        <div id="month">
            2018年07月
        </div>
        <div class="right" onclick="change_month($(this),1)" data-aid="{$aid}" data-pid="{$pid}">
            >
        </div>
    </div>
    <div class="day">
        <table class="date">
            <thead>
            <tr>
                <th>日</th>
                <th>一</th>
                <th>二</th>
                <th>三</th>
                <th>四</th>
                <th>五</th>
                <th>六</th>
            </tr>
            </thead>
            <tbody id="date_body">

            </tbody>
        </table>
    </div>
</div>
</body>
</html>